/**
 * Created by Administrator on 2017/12/18 0018.人事招聘
 */
import dynamic from 'dva/dynamic';

// wrapper of dynamic
const dynamicWrapper = (app, models, component) => dynamic({
  app,
  models: () => models.map(m => import(`../models/${m}.js`)),
  component,
});


export const ExaminationApproval = (app) => {
  return {
    name: '审批',
    icon: 'shenpi',
    path: 'examinationapproval',
    children: [
      {
        name: '审批管理',
        path: 'examinationapprovalmanage',
        component: dynamicWrapper(app, ['monitor'], () => import('../routes/ExaminationApproval/ExaminationApprovalManage')),
      },
      {
        name: '',//编辑审批
        path: 'editorialapproval',
        component: dynamicWrapper(app, ['monitor'], () => import('../routes/ExaminationApproval/EditorialApproval')),
      },
    ],
  };
};
